package dyyx.simplerpc;

public class NettyClientMain  {
	
    public static void main(String[] args) throws Exception {
    	
    	String ip = System.getProperty("ip","127.0.0.1");
    	int port = Integer.getInteger("port", 8888);
		System.out.println("ip="+ip+",port="+port);
		
		

    	RpcClientDynamicProxy<HelloService> clientProxyFactory = new RpcClientDynamicProxy<>(HelloService.class, ip, port);
    	HelloService helloService = clientProxyFactory.getProxy();
        String result = helloService.hello("dyyx");
		System.out.println("result="+result);
		for(int i=0;i<3;i++) {
			result = helloService.hello("dyyx-"+i);
			System.out.println("result="+result);
		}

    	
    }

}

